Prime Usernames
TIME LIMIT = 1 SEC.
- CodeChef decided to gift 'Prime Usernames' to the top performers of their March Long Contest 2020. But CodeChef's administrators have tons of other work to do, so they have asked you to find out if a given username is a Prime Username or not.
A Prime Username is a username whose number of unique characters is a prime number.
Input | Output |
The first line of the input contains N - the length of the username. The second line contains the username itself. Note that the username is case-sensitive (i.e. 'a' and 'A' are considered to be different characters) and contains numbers and special characters. |
Print "YES" if the given username is a Prime Username. Otherwise, print "NO" (without the double quotes). |
- 1 ≤ N ≤ 106